<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
       	<f:metadata>
    	   <f:viewParam name="login" value="#{dialogueBean.login}"/>
	    </f:metadata>
   <head><title>IGNORED</title></head>
   <body>
      <ui:composition template="/templates/masterLayout.xhtml">
         <ui:define name="windowTitle">
            Мои диалоги
         </ui:define>

         <ui:define name="content">
         	<p>Мои диалоги</p>
         	
            <h:dataTable value="#{dialogueBean.lastMessages}" var="message">
		    <h:column>
        	<f:facet name="header">
	            <h:outputText value="Опубликовано" />
    	    </f:facet>
        		<h:outputText value="#{message.sentDate}" />
    		</h:column>
    		<h:column>
        	<f:facet name="header">
	            <h:outputText value="Собеседник" />
    	    </f:facet>
        	<h:outputText value="#{message.otherParty}" />
    		</h:column>
    		<h:column>
        	<f:facet name="header">
            <h:outputText value="Тема сообщения" />
		        </f:facet>
		        <h:link outcome="dialogue" value="#{message.theme}">
   					<f:param name="login" value="#{message.otherParty.login}"/> 
				</h:link>
		    </h:column>
    		<h:column>
        	<f:facet name="header">
	            <h:outputText value="Текст" />
    	    </f:facet>
        	<h:outputText value="#{message.text}" />
    		</h:column>
</h:dataTable>
         </ui:define>
      </ui:composition>
   </body>
</html>